#!bin/bash

#删除容器
if [ $(docker ps -aq --filter name=common-gateway) ]; then
  docker rm -f common-gateway
fi
#删除镜像
if [[ $(docker images |grep ccf/common-gateway-platform) ]]; then
  docker rmi ccf/common-gateway-platform:v1.0
fi
docker build  -t ccf/common-gateway-platform:v1.0 .
docker run --restart=always   --name common-gateway -d -p 8110:8110 ccf/common-gateway-platform:v1.0